function D = deleteItems(Q, item_id)
%SQL query to delete an item

%Romesh Stanislaus May 2010

if isnumeric(item_id)
    item_id = num2str(item_id);
end
D = ['<S3QL><delete>item</delete><where><item_id>',item_id,'</item_id></where></S3QL>'];

Q.X = D;

[D1,Q]=s3db_read(Q); % -2
%D1 is a struct with several msg if the data was linked so just use the first one for this
%purpose. 
if str2num(D1(1).error_code)
    error(D1);
end
pause(1);
D=D1;